net: Prevent overflows when allocating memory for arrays
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 18:04:43 +0000 (18:04 +0000)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit6bdaebd3229477a09ff2bed34c75261cf44e13d8
tree3ef4720d822618a830e35a34f6cab792491460bd
parentfc2efa9fdb67f487d34b370c8c57c4a3cd50332b
net: Prevent overflows when allocating memory for arrays

Use grub_calloc() when allocating memory for arrays to ensure proper
overflow checks are in place.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Prevent-overflows-when-allocating-memory-for-arrays.patch
grub-core/net/dns.c
grub-core/net/net.c